import React from 'react';
import {Redirect} from "react-router-dom";

const Login = React.lazy(() => import("@/pages/login"));
const Vip = React.lazy(() => import("@/pages/vip"));

const Major = React.lazy(() => import("@/pages/major"));
const Follow = React.lazy(() => import("@/pages/major/follow"));
const Video = React.lazy(() => import("@/pages/major/video"));

const routes = [
  {
    path: "/login",
    component: Login
  },
  {
    path: "/major",
    component: Major,
    routes: [
      {
        path: "/major",
        exact: true,
        render: () => <Redirect to="/major/follow"/>
      },
      {
        path: "/major/follow",
        component: Follow
      },
    ]
  },
]

export default routes;
